<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>函数</title>
</head>
<body>
	<script>
		//闭包

		var scope = "global scope";
		function checkscope(){
			var scope = "local scope";
			function f(){ return scope; }
			return f();
		}
		console.log(checkscope());
	</script>
</body>
</html>